const express = require("express");
const aboutServ = require("../services/aboutService");
const getSendData = require("../utils/getSendData");

const router  = express.Router();

router.get("/", async (req, res, next) => {
    res.send(getSendData(await aboutServ.getAbout()));
});

router.post("/", async (req, res, next) => {
    res.send(getSendData(await aboutServ.setAbout(req.body)));
});

module.exports = router;
